<template>
  <div class="app">
    <h1>我是App组件</h1>
    <br>
    <Person :name="name" :age="age" :updateAge="updateAge"/>
  </div>
</template>

<script>
  import Person from './components/Person'

  export default {
    name:'App',
    components:{Person},
    data() {
      return {
        name:'晶晶',
        age:45
      }
    },
    methods: {
      updateAge(value){
        this.age += value
      }
    },
  }
</script>

<style>
  .app {
    background-color: skyblue;
    padding: 20px;
    border-radius: 10px;
    box-shadow:  0 0 10px black;
  }
</style>